<template>
  <div>
    <button @click="changeColor"></button>
    <h1 v-move-directive.name="{
      color: `red`
    }">我是B组件</h1>
  </div>
</template>

<script setup lang="ts">


import { getCurrentInstance, Ref, ref, Directive, DirectiveBinding } from 'vue';


const changeColor = () => {

}
const vMoveDirective: Directive = {
  created: (...arg: Array<any>) => {
    console.log(...arg);

  },
  mounted(el: any, dir: DirectiveBinding) {
    el.style.color = dir.value.color

  },

}
</script>

<style lang="scss" scoped>
</style>